package com.eforce.comp1;
/**
* This file contains all the constants that will be used in the application.
* @author ABiswas
*
*/
import java.io.*;
import java.util.Scanner;
//import java.io.*;
import java.io.File;
import java.io.PrintWriter;
public class InputExample {
public static void main(String args[ ]) throws IOException {
Scanner s = new Scanner(System.in);
System.out.print("Enter your height in centimeters: ");
float height = s.nextFloat();
System.out.print("Enter your weight in kilograms: ");
float weight = s.nextFloat();
float bmi = weight/(height*height)*10000;
System.out.println("Your body mass index is " + bmi + ".");
System.out.printf("%8.2f", bmi);
String name = "Anish";
int age = 12;
System.out.printf("Hello, %s. Next year, you'll be %d", name, age);
//Scanner in = new Scanner(new File("myfile.txt"));
/*
Scanner in = new Scanner(System.in);
while (sum < goal)
{
System.out.print("Enter a number: ");
n = in.nextInt();
if (n < 0) continue;
sum += n; // not executed if n < 0
}
*/
}
}